Skip to content

Comments

Introduce component service#104

Merged
majst01 merged 2 commits intomainfrom
infra-service-ping
Feb 20, 2026
Merged

Introduce component service#104
majst01 merged 2 commits intomainfrom
infra-service-ping

Conversation

@majst01
Copy link
Contributor

@majst01 majst01 commented Feb 16, 2026

Description

Introduce a ping which every microservice which is connected to the metal-apiserver should call at a regular interval.

Admins can then inspect which services are running and see how long they have been up and which token they have in use and how long this token is valid.

@majst01 majst01 self-assigned this Feb 16, 2026
@majst01 majst01 force-pushed the infra-service-ping branch 6 times, most recently from 8dbaa92 to 09b6160 Compare February 18, 2026 12:50
@majst01 majst01 changed the title Introduce component ping Introduce component service Feb 18, 2026
message ComponentServicePingResponse {}

// ComponentType defines which service is actually pinging
enum ComponentType {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we should put this message and the admin.v2.Component message into api.v2 ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move it to api

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

// ComponentService serves component, e.g. microservices related functions.
service ComponentService {
// Ping must be called from every connected microservice in a recurring manner
// to get visibility of all required microservices.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// to get visibility of all required microservices.
// to get visibility of all registered microservices.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

COMPONENT_TYPE_METAL_CONSOLE = 5 [(metalstack.api.v2.enum_string_value) = "metal-console"];
// COMPONENT_TYPE_METAL_METRICS_EXPORTER is metal-metrics-exporter
COMPONENT_TYPE_METAL_METRICS_EXPORTER = 6 [(metalstack.api.v2.enum_string_value) = "metal-metrics-exporter"];
// TODO what about gepm, ccm, etc. I would allow them to call this service but would not introduce
Copy link
Contributor

@iljarotar iljarotar Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove other enum

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

// Delete a component
rpc Delete(ComponentServiceDeleteRequest) returns (ComponentServiceDeleteResponse) {
option (metalstack.api.v2.admin_roles) = ADMIN_ROLE_EDITOR;
option (metalstack.api.v2.admin_roles) = ADMIN_ROLE_VIEWER;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only editor and include auditing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


// Component represents a microservice connected to our apiserver
message Component {
// UUID identifies this component event
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// UUID identifies this component event
// UUID identifies this component

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


// ComponentQuery to query components
message ComponentQuery {
// UUID identifies this component event
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// UUID identifies this component event
// UUID identifies this component

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@majst01 majst01 force-pushed the infra-service-ping branch 4 times, most recently from 31eb835 to 6645c4d Compare February 20, 2026 09:19
@majst01 majst01 marked this pull request as ready for review February 20, 2026 09:19
@majst01 majst01 requested a review from a team as a code owner February 20, 2026 09:19
@majst01 majst01 force-pushed the infra-service-ping branch 5 times, most recently from b401d8b to 4849676 Compare February 20, 2026 09:57
@majst01 majst01 merged commit bb6cd38 into main Feb 20, 2026
3 checks passed
@majst01 majst01 deleted the infra-service-ping branch February 20, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants